﻿@model SDSystem.Models.GroupNew
@using Ext.Net.MVC;
@using Ext.Net;
@{
    ViewBag.Title = "CreateGroupNews";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@*@(Html.X().FormPanel().ID("PanelP1")
    .Items(items => {
        items.Add(Html.X().FileUploadField().ID("upload").FieldLabel("Upload Image").LabelAlign(LabelAlign.Top).AnchorHorizontal("100%").Text("Add file"));
    })
    .Buttons(buttons =>
    {
        buttons.Add(Html.X().Button().ID("ButtonSave").Text("Save").Icon(Icon.DatabaseSave)
            .DirectEvents(directEvents =>
            {
                directEvents.Click.IsUpload = true;
                directEvents.Click.Url = "/Test/Save";
                directEvents.Click.EventMask.ShowMask = true;
                directEvents.Click.EventMask.Msg = "Loading...";
            })
        );
    })
)*@
@(Html.X().FormPanel()
      .ID("CreateGNewsView")
      .BodyPadding(5)
          .Buttons(buttons =>
                       {
                           buttons.Add(
                               Html.X().Button().Text("Save").Icon(Icon.Disk).DirectEvents(
                                de =>
                                    {
                                        de.Click.IsUpload = true;
                                        de.Click.Confirmation.ConfirmRequest = true;
                                        de.Click.Confirmation.Title = "Save";
                                        de.Click.Confirmation.Message = "Confirm?";
                                        de.Click.Url = Url.Action("CreateGroupNews");
                                        de.Click.EventMask.ShowMask = true;
                                        de.Click.FormID = "CreateGNewsView";
                                })
                               );
                           buttons.Add(
                               Html.X().Button().Text("Back").Icon(Icon.PreviousGreen)
                               );
                       })
      .Items(
          Html.X().FieldSet().Title("GroupNews Details").Layout(LayoutType.Form).Padding(5).Items(
              Html.X().TextFieldFor(m=>m.GroupName).FieldLabel("GroupNews Name").LabelWidth(100).Width(600).LabelAlign(LabelAlign.Top),
              Html.X().TextFieldFor(m => m.Tag).FieldLabel("Tag").LabelWidth(100).Width(600).LabelAlign(LabelAlign.Top),
              Html.X().HtmlEditorFor(m => m.Description).FieldLabel("Description").Height(150).LabelWidth(100).LabelAlign(LabelAlign.Top),
              Html.X().FileUploadField().ID("imgUpload").FieldLabel("Upload Image").Text("Image Url").LabelWidth(100).Width(600).LabelAlign(LabelAlign.Top),
              Html.X().TextFieldFor(m=>m.Keyword).FieldLabel("Keyword").LabelWidth(100).Width(600).LabelAlign(LabelAlign.Top))))